package com.dynabook.ems.mapper;

import com.dynabook.ems.model.entity.EmsEngineWorkOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @author tester
* @description 针对表【ems_engine_work_order(样机和工单的关系表)】的数据库操作Mapper
* @createDate 2025-07-28 09:11:00
* @Entity com.dynabook.ems.model.entity.EmsEngineWorkOrder
*/
public interface EmsEngineWorkOrderMapper extends BaseMapper<EmsEngineWorkOrder> {

    /**
     * 根据申请ID获取详情ID
     * @param emsRequestId 申请ID
     * @return 详情ID
     */
    String getDetailIdByRequestId(@Param("emsRequestId") String emsRequestId);
    
    /**
     * 根据详情ID获取所有申请信息
     * @param detailId 详情ID
     * @return 申请信息列表
     */
    List<Map<String, Object>> getRequestsByDetailId(@Param("detailId") String detailId);

}




